package edu.sdjzu.exam.dto.examSession;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class ExamSessionDTO {
    private Long sessionId;
    private Long examId;
    private Long studentId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    private Integer remainingTime;
    private String ipAddress;
    private String deviceInfo;
    private String status;
    private String videoStreamUrl;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
    private List<AnswerDTO> answers;

    @Data
    public static class AnswerDTO {
        private Long answerId;
        private Long questionId;
        private String answerContent;
        private String filePath;
        private Boolean isDraft;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime answerTime;
    }
}
